package springboot.conf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.xq.softcup.mq.client.factory.MqClientFactory;

@Component
public class MqConf {

    @Value("${xqmq.admin.address}")
    private String adminAddress;
    @Value("${xqmq.accessToken}")
    private String accessToken;

    @Bean
    public MqClientFactory getMqConsumer(){
        MqClientFactory mqClientFactory = new MqClientFactory();
        mqClientFactory.setAdminAddress(adminAddress);
        mqClientFactory.setAccessToken(accessToken);
        return mqClientFactory;
    }

}
